package com.zeekr.controller;

import com.alibaba.fastjson.JSON;
import com.zeekr.bean.UserDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @description: 参数效验测试
 * @author: e-Yuanping.Yang1
 * @time: 2024/6/19 14:11
 */
@Slf4j
@RestController
public class ParamValidController {

    @PostMapping("/user/add")
    public String addUser(@Valid @RequestBody UserDTO dto){
        log.info("参数:{}", JSON.toJSONString(dto));
        return JSON.toJSONString(dto);
    }
}
